Skip to content

feat: digest-only calendars that never distribute blockers#15

Merged
okash1n merged 2 commits into
mainfrom
feat/digest-calendars
Jul 6, 2026
Merged

feat: digest-only calendars that never distribute blockers#15
okash1n merged 2 commits into
mainfrom
feat/digest-calendars

Conversation

@okash1n

@okash1n okash1n commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

概要

「他アカウントへブロッカーを配布したくないが、朝のダイジェストには載せたい」カレンダー(例: ゴミの日カレンダー)のための第 3 の役割 digest_calendars を追加します。

accounts:
  - id: personal
    provider: google
    digest_calendars: ["xxxx@group.calendar.google.com"]

実装ポイント

  • ダイジェストのライブ取得にだけ参加。同期エンジン(tick / カーソル / キャッシュ / リコンサイル / 配布)には構造的に関与しない(calendars に含まれないため — tick が DigestCalendars を一切読まないことを回帰テスト TestTickNeverDistributesDigestCalendarEvents で固定)
  • 検証: google のみ許容(Graph は v1 で primary 固定のため)/ calendars との重複・リスト内重複・空文字列はエラー
  • 制約(spec 明記): このカレンダーの予定は 5 分前リマインド対象外(キャッシュに入らないため)

検証

  • go build / go test ./... -race -count=1 / go vet / gofmt -l(出力なし)/ docker compose config -q
  • タスクレビュー承認(エンジン隔離・リマインド除外の構造的保証をレビュアーがソース側で独立検証)
  • 対象カレンダー(佐伯区ゴミ)は API プローブでトークン読み取り可・全件終日 transparent を実測確認済み

okash1n added 2 commits July 6, 2026 16:34
digest_calendars を Account に追加し、ダイジェストのライブ取得にだけ参加する
通知専用カレンダーを指定できるようにする(google のみ・calendars との重複や
リスト内重複・空文字列はエラー)。collectDigest のカレンダーループを
Calendars→DigestCalendars の連結にするだけで、tick/reconcile 等の同期エンジンは
無変更(digest_calendars は監視対象に含まれないため構造的にブロッカー配布対象
にならない)。
Copilot AI review requested due to automatic review settings July 6, 2026 07:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a third calendar role, digest_calendars, to support “digest-only” calendars that appear in the morning digest but never participate in the sync engine (cursor/cache/reconcile/blocker distribution), aligning with calsync’s engine invariants by keeping these calendars structurally out of tick.

Changes:

  • Extend config schema with accounts[].digest_calendars (Google only) plus validation (no overlap with calendars, no duplicates, no empty entries; Microsoft rejected due to v1 constraint).
  • Include DigestCalendars in digest live-collection (collectDigest) while keeping tick distribution unaffected; add regression tests to lock this in.
  • Document the feature in README and CHANGELOG; add a dedicated design spec.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
README.md Documents digest_calendars, its constraints, and how to find a Google Calendar ID.
internal/engine/notify.go Includes DigestCalendars in digest live fetch by concatenating with Calendars.
internal/engine/notify_test.go Adds tests ensuring digest inclusion and preventing blocker distribution from digest_calendars.
internal/config/config.go Adds DigestCalendars to config model, YAML loading, and validation (Google-only; dedupe/empty/overlap checks).
internal/config/config_test.go Adds config-load tests covering acceptance/rejection and validation errors for digest_calendars.
docs/superpowers/specs/2026-07-06-digest-calendars-design.md New design spec describing intent, constraints, validation, and test plan.
CHANGELOG.md Records the new digest_calendars feature under Added.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +16 to +21
accounts:
- id: personal
provider: google
email: okash1n.fcs@gmail.com
digest_calendars: ["xxxxx@group.calendar.google.com"] # 通知専用(ブロック元にならない)
```
@okash1n okash1n merged commit 9971ab3 into main Jul 6, 2026
1 check passed
@okash1n okash1n deleted the feat/digest-calendars branch July 6, 2026 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants